CFLAGS =  -ggdb -Wall -fopenmp -static
CC = g++ -O2 $(CFLAGS)

TARGETS =	clip
LIBS = -lm -lstdc++ 
 
CLIP = AlignmentsQ.cpp Filename.cpp GenomeNTdata.cpp ReadInBits.cpp Clippers.cpp chromosomeNTdata.cpp\
bitsOperationUtil.cpp FileOutputBuffer.cpp HashIndexT.cpp ReadInBitsSet.cpp SeedPattern.cpp\
boolFlagArray.cpp GenomeInBits.cpp Index_Table.cpp ReadsMapping.cpp ReadDelMapping.cpp ShortReadUtil.cpp\
chdir.cpp Genome_Index.cpp MismatchScores.cpp stdafx.cpp SeqInBits.cpp\
ColorSpaceRead.cpp Genome_Index_Table.cpp ParameterList.cpp ReadsMappingStats.cpp\
FileInputBuffer.cpp Genome_Index_TableQ.cpp ReadsQualScores.cpp ChrIndex2GeneName.cpp\
ReadsFileParser.cpp MappingResult.cpp refInBinFile.cpp LongReadsSet.cpp LongReadInBits.cpp\
SimSplicedRead.cpp TestClippers.cpp Flags.cpp

all:		$(TARGETS)
#	-ctags *.[ch]


install:	all
	strip $(TARGETS)
	cp $(TARGETS) /usr/local/sbin
	cp *.1 /usr/local/man/man1


clip:	$(CLIP)
	make clean
	$(CC) -o $@ $(CFLAGS) $(LIB_PATH) $(CLIP) $(LIBS)
	#$(CC) -o $@ $(LIB_PATH) *.o $(LIBS)

tar:	clean
	tar cvfz $(TARGETS).tar.gz *.cpp *.h makefile

clean:
	-rm -f *.o *.exe cut out $(TARGETS) $(TARGETS).tar.gz
	
